package com.yuncheng.spcyApi.spcy;

import com.yuncheng.spcyApi.service.ISpcyRsYwzdxxService;
import com.yuncheng.spcyApi.utils.GetCurrentUserUtils;
import com.yuncheng.vo.HttpResult;
import com.yuncheng.spcyApi.vo.common.HttpResultVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author hua
 */
@Api(tags = "操作指引")
@RestController
@RequestMapping("/api/spzx-spcy/guide")
public class SpcyOperationGuideController {

    @Resource
    private ISpcyRsYwzdxxService spcyRsYwzdxxService;

    @ApiOperation(value = "获取操作指引-检查员报销单-操作状态")
    @GetMapping(value = "czzyBxdZt")
    public HttpResult czzyBxdZt(){

        return HttpResultVo.HttpResultGet(spcyRsYwzdxxService.queryOperationGuideInJcybxd(GetCurrentUserUtils.getCurrentUserId(), false, false));
    }

    @ApiOperation(value = "操作指引-检查员报销单-操作状态（跳过操作）")
    @GetMapping(value = "tgBxdZt")
    public HttpResult tgBxdZt(){

        return HttpResultVo.HttpResultGet(spcyRsYwzdxxService.queryOperationGuideInJcybxd(GetCurrentUserUtils.getCurrentUserId(), true, false));
    }

    @ApiOperation(value = "操作指引-检查员报销单-操作状态（重置操作）")
    @GetMapping(value = "czBxdZt")
    public HttpResult czBxdZt(){

        return HttpResultVo.HttpResultGet(spcyRsYwzdxxService.queryOperationGuideInJcybxd(GetCurrentUserUtils.getCurrentUserId(), false, true));
    }

    @ApiOperation(value = "获取操作指引-用户现场检查-操作状态")
    @GetMapping(value = "czzyXcjcZt")
    public HttpResult czzyXcjcZt(){

        return HttpResultVo.HttpResultGet(spcyRsYwzdxxService.selectOperationGuideInXcjcUser(GetCurrentUserUtils.getCurrentUserId(), false, false));
    }

    @ApiOperation(value = "操作指引-用户现场检查-操作状态（跳过操作）")
    @GetMapping(value = "tgXcjcZt")
    public HttpResult tgXcjcZt(){

        return HttpResultVo.HttpResultGet(spcyRsYwzdxxService.selectOperationGuideInXcjcUser(GetCurrentUserUtils.getCurrentUserId(), true, false));
    }

    @ApiOperation(value = "操作指引-用户现场检查-操作状态（重置操作）")
    @GetMapping(value = "czXcjcZt")
    public HttpResult czXcjcZt(){

        return HttpResultVo.HttpResultGet(spcyRsYwzdxxService.selectOperationGuideInXcjcUser(GetCurrentUserUtils.getCurrentUserId(), false, true));
    }
}
